<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>缤格</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/swiper.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../script/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/binge.css"/>
    <script type="text/javascript" src="../../script/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../../script/layui/layui.all.js"></script>
    <script type="text/javascript" src="../../script/swiper.min.js"></script>
    <script type="text/javascript" src="../../script/mobile.js"></script>

    <script type="text/javascript">
        window['adaptive'].desinWidth = 750;
        window['adaptive'].baseFont = 28;
        window['adaptive'].maxWidth = 750;
        window['adaptive'].init();
    </script>
</head>

<body>


<div class="circle-head bg-cover" id="circleBg" style="background: url()">
    <div id="header">
        <!-- header -->
        <div class="header" style="margin-bottom: 0;">
            <div class="head-back">
                <a href="javascript:void(0);" tapmode onclick="comeBack(2)" class="back-btn-white"></a>
            </div>
            <div class="head-title">
                <h6 style="color: transparent" class="circleName"></h6>
            </div>
            <!--<div class="head-action">
                <a href="javascript:void(0);" tapmode class="action-btn-white"></a>
            </div>-->
        </div>

        <!-- header end -->
    </div>


    <div class="circle-view">
        <div class="circle-info">
            <div class="circle-img bg-cover" id="circleImg" style="background: url()"></div>
            <div class="info" style="width: calc(100% - 1.5rem)">
                <h6 class="circleName"></h6>
                <p class="multiline-ellipsis" id="circleIntroduce"></p>
            </div>
        </div>
        <div class="follow" id="follow" tapmode onclick="comfirmFollow()">关注</div>
    </div>
    <div class="flex-invite">
        <div class="ask-num">
            <p class="num" id="ask_invite">请教贴剩余<em id="surplusPost">15</em>个</p><!--学校圈子显示，普通圈子隐藏-->
        </div>
        <div class="invite-tips" tapmode onclick="hot_ranking('hot_rank')">
            <ul id="hotRanking">
                <!--<li class="user-icon bg-cover" style="background: url('../../image/img-tx.png')"></li>-->
            </ul>
            <span>热度榜 ></span>
        </div>
    </div>
</div>

<div class="circle-master">
    <div class="master" tapmode onclick="circleMaster()">
        <div class="bg-master">
            <div class="master-img bg-cover" id="masterImg" style="background: url()"></div>
        </div>
        <div class="master-name" id="masterName"></div>
    </div>
    <a href="javascript:void(0);" tapmode onclick="applyMaster('circle_master')" class="be-master"></a>
</div>

<div class="up-invite">
    <ul id="up_info">
        <!--<li onclick="commonUrl()" tapmode>
            <h6 class="single-ellipsis">#高校迎接建国70周年活动#</h6>
            <p class="single-ellipsis">一起与国旗合影吧！共同迎接建国70周年庆，</p>
        </li>-->
    </ul>
</div>

<div class="circle-list-section">
    <div class="comment-kinds">
        <ul>
            <li tapmode onclick="tabComment(1,this)" class="on"><span>动态</span></li>
            <li tapmode onclick="tabComment(4,this)"><span>投票</span></li>
            <li tapmode onclick="tabComment(2,this)"><span>需求</span></li>
            <li tapmode onclick="tabComment(3,this)"><span>广场</span></li>
        </ul>
        <div class="screen-btn" tapmode onclick="screen(this)">按热度</div>
    </div>
    <div class="circle-list" style="display: block;">
        <div class="index-news user-dynamic">
            <ul id="inviteContent">

            </ul>
        </div>
    </div>
    <div class="circle-list" style="display: none;">
        <div class="index-news user-dynamic">
            <ul id="voteContent">

            </ul>
        </div>
    </div>
    <div class="circle-list" style="display: none;">
        <div class="activity-list">
            <ul id="actContent">

            </ul>
        </div>
    </div>
    <div class="circle-list" style="display: none; padding: 0;">
        <!--<div class="store-list">
            <ul id="storeContent">
                <li onclick="commonUrl('store_detail')" tapmode>
                    <div class="store-img bg-cover" style="background: url('../../image/store-img01.png')"></div>
                    <div class="store-info">
                        <h6>松鼠铺子</h6>
                        <p class="single-ellipsis">做最好吃的坚果品牌</p>
                    </div>
                </li>
            </ul>
        </div>-->
        <div class="department" id="department">
            <div class="kinds">
                <ul id="departmentkinds">
                    <!-- <li class="on" tapmode onclick="getLists()"><span>学生会学生会</span></li>
                    <li tapmode onclick="getLists()"><span>社团</span></li>
                    <li tapmode onclick="getLists()"><span>学生会</span></li>
                    <li tapmode onclick="getLists()"><span>社团</span></li> -->
                </ul>
            </div>
            <div class="lists">
                <ul id="departmentlist">
                    <!-- <li tapmode onclick="">
                        <div class="list-info" tapmode onclick="toDetail(2)">
                            <div class="num"><span>NO.1</span></div>
                            <div class="info">
                                <h6>外联部</h6>
                                <div class="pf">
                                    <div class="star" data-num="4"></div>
                                    <div class="mark">4.0分</div>
                                </div>
                            </div>
                        </div>
                        <div class="toEvaluate" tapmode onclick="toEvaluate(2)">去评星</div>
                    </li> -->

                </ul>
            </div>

        </div>
    </div>

</div>

<div class="fixed-btn">
    <a href="javascript:void(0);" tapmode onclick="openModel()" class="add-invite"></a>
    <a href="javascript:void(0);" tapmode onclick="loadPage()" class="reload-view"></a>
</div>


<!-- 发布操作 -->
<div class="release-model model" tapmode onclick="closeModel()">
    <div class="release-view" tapmode onclick="stopModel(event)">
        <div class="release-kinds">
            <ul>
                <li class="bg1">
                    <!--<a href="javascript:void(0);" tapmode onclick="release_invitation('../school/release_invitation')">发布动态</a>-->
                    <a href="javascript:void(0);" tapmode onclick="release()">发布动态</a>
                </li>
                <li class="bg2">
                    <a href="javascript:void(0);" tapmode onclick="release_activity('../school/release_vote')">发布投票</a>
                </li>
                <li class="bg3">
                    <a href="javascript:void(0);" tapmode onclick="release_activity('../activity/release_activity')">发布需求</a>
                </li>
            </ul>
        </div>

        <div class="close-view">
            <a href="javascript:void(0);" tapmode onclick="closeModel(event)" class="model-close"></a>
        </div>
    </div>
</div>
<!-- 发布操作 end -->

</body>
</html>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">
    var circle_id = '';//圈子id
    var type = 1;//1普通贴，2活动，3广场
    var sort = 1;//1为时间(默认)，2为热度
    var page = 1;
    var pullUp = true;
    var member_id = '';//圈主id
    var circle_follow = '';//关注状态
    var circleIntroduce = '';//圈子简介
    var firstType = '';//广场的一级id
    var _model = $(".model");
    apiready = function () {
        $api.fixStatusBar($api.dom('#header'));
        api.setStatusBarStyle({
            style: 'light', //设置APP状态栏字体色
            color: 'rgba(255,255,255,0)', //设置APP状态栏背景色
        });
        //setFixStatusBar(); //设置状态栏

        circle_id = api.pageParam.circle_id;
        // circle_id = 2;

        //监听返回键
        keybackListener();

        getCircleDetail()

        //发布活动返回监听刷新
        api.addEventListener({
            name: 'activity'
        }, function (ret, err) {
            closeModel()
            page = 1;
            getCircleDetail()
        });
        //发布帖子返回监听刷新
        api.addEventListener({
            name: 'set_invitation'
        }, function (ret, err) {
            closeModel()
            page = 1
            getCircleDetail()
        });

        api.addEventListener({
            name: 'shield'
        }, function (ret, err) {
            page = 1;
            getCircleDetail()
        });

        //评星后的监听
        api.addEventListener({
            name: 'star'
        }, function (ret, err) {
            circle_gc2()
        });

        //上拉加载
        pullUpLoading(function () {
            if (pullUp == true) {
                if(type != 3){
                    getCircleDetail()
                }
            }
        });

        /*//下拉刷新
        dropDownRefresh(function () {
            page = 1;
            getCircleDetail()
        });*/


        SystemCheckVersion()


    };


    //去评星
    function toEvaluate(id) {
        var path = '../circle/department_evaluate';
        var param = {id:id}
        commonUrl(path,param)
    }

    //对应社团详情
    function toDetail(id,ranking) {
        var path = '../circle/department_index';
        var param = {id:id,ranking:ranking}
        commonUrl(path,param)
    }



    //发布帖子

    function release() {
        checkSystemType(function () {
            //ios
            var bgft = api.require('BGFT');
            var aa = {
                token: $api.getStorage('token'),
                circle_id: circle_id
            }
            console.log(jsonChange(aa))
            bgft.showAlert({
                token: $api.getStorage('token'),
                circle_id: circle_id
            },function(ret, err) {
                if (ret){
                    console.log(JSON.stringify(ret));
                    closeModel()
                    page = 1;
                    getCircleDetail()
                    pop.notice('发布成功',2.5)
                    api.sendEvent({
                        name: 'memberInfo',
                        extra: {}
                    });
                    api.setStatusBarStyle({
                        style: 'light', //设置APP状态栏字体色
                        color: 'rgba(255,255,255,0)', //设置APP状态栏背景色
                    });
                }else {
                    console.log(JSON.stringify(err));
                    api.setStatusBarStyle({
                        style: 'light', //设置APP状态栏字体色
                        color: 'rgba(255,255,255,0)', //设置APP状态栏背景色
                    });
                }

            });
        },function () {
            //android
            // release_invitation('../school/release_invitation')

            var htmlEditor = api.require('htmlEditorSdk');
            var p = {
                token: $api.getStorage('token'),
                circle_id: circle_id
            }
            htmlEditor.startHtmlEditorSdk(p,function(ret, err) {
                if (ret){
                    console.log(JSON.stringify(ret));
                    closeModel()
                    page = 1;
                    getCircleDetail()
                    pop.notice('发布成功',2.5)
                    api.sendEvent({
                        name: 'memberInfo',
                        extra: {}
                    });
                }else {
                    console.log(JSON.stringify(err));
                }

            });
        });

    }

    //刷新当前数据
    function loadPage() {
        page = 1;
        if(type == 3){
            circle_gc1()
        }else {
            $("#inviteContent").html('');
            $("#voteContent").html('');
            $("#actContent").html('');
            getCircleDetail()
        }
    }

    //获取圈子详情
    function getCircleDetail() {
        var param = {
            token: $api.getStorage('token'),
            id: circle_id,
            type: type,//1普通贴，2活动，3广场
            paixu: sort,//1为时间，2为热度
            page: page,
        }
        console.log(jsonChange(param))
        pop.loading();
        getAjax(Interface.circle_home, param, function (res) {
            console.log(jsonChange(res))
            api.sendEvent({
                name: 'follow_Circle'
            })
            // console.log(jsonChange(res))
            var circle = res.data.circle;//圈子详情
            var list = res.data.list;

            if (isDefine(circle)) {
                var infoList = res.data.circle.circle_notice;//圈子消息


                $("#circleImg").css({background: 'url(' + ajaxUrl + circle.icon_path + ')'});
                $("#circleBg").css({background: 'url(' + ajaxUrl + circle.back_icon_path + ')'});
                $(".circleName").html(circle.title);


                if(circle.type == 4){
                    $("#ask_invite").show();
                    $("#surplusPost").html(circle.consult);

                }else {
                    $("#ask_invite").hide();
                }
                $("#circleIntroduce").html(circle.introduce);
                circleIntroduce = circle.introduce;

                if (circle.member_id == 0) {
                    $("#masterName").html('<p class="c-666" style="font-weight: normal;">圈主：暂无圈主，可<em>点击申请</em></p>');
                    $("#masterImg").css({background: 'url(' + ajaxUrl + circle.member_icon_path + ')'});

                } else {
                    $("#masterName").html('圈主：' + circle.member_name);
                    $("#masterImg").css({background: 'url(' + ajaxUrl + circle.member_icon_path + ')'});
                }
                member_id = circle.member_id;


                //是否关注
                circle_follow = circle.circle_follow;
                if (circle.circle_follow == 1 || circle.circle_follow == 2) {
                    $("#follow").addClass('on').html('已关注')
                } else {
                    $("#follow").removeClass('on').html('关注')
                }
                //热度榜头像集
                if (isDefine(circle.hot_member)) {
                    var hotHtml = '';
                    for (var i = 0; i < circle.hot_member.length; i++) {
                        if (i < 3) {
                            hotHtml += '<li class="user-icon bg-cover" style="background: url(' + ajaxUrl + circle.hot_member[i].member.icon_path + ')"></li>'
                        }
                    }
                    $("#hotRanking").html(hotHtml)
                }

                if (isDefine(infoList)) {
                    $(".up-invite").show();
                    var info_list = '';

                    for (var i = 0; i < infoList.length; i++) {
                        var info_id = {info_id: infoList[i].id, circleIntroduce: circleIntroduce}
                        info_list += '<li onclick=\'commonUrl("circle_information",' + jsonChange(info_id) + ')\' tapmode>' +
                            '            <h6 class="single-ellipsis">' + infoList[i].title + '</h6>' +
                            '            <p class="single-ellipsis">' + infoList[i].brief + '</p>' +
                            '        </li>'

                    }
                    $("#up_info").html(info_list)
                }else {
                    $(".up-invite").hide();
                }

            }

            if (isDefine(list)) {

                if (type == 1) {

                    var listHtml = '';

                    for (var i = 0; i < list.length; i++) {

                        var listData = list[i];

                        listHtml += getInviteText(listData,1);

                    }

                    if (page == 1) {
                        if(list.length < res.data.sumpage){
                            listHtml +='<li style="border-bottom: none;"><p class="c-999 t-c pt30 pb20" style="width: 100%;">没有更多了</p></li>'
                            pullUp = false;
                        }else {
                            pullUp = true;
                        }
                        $("#inviteContent").html(listHtml)
                    } else {
                        $("#inviteContent").append(listHtml)
                        pullUp = true;
                    }
                    page++;

                    SystemCheckVersion()
                } else if (type == 2) {

                    var listHtml = '';

                    for (var i = 0; i < list.length; i++) {

                        var listData = list[i];

                        listHtml += getActivityText(listData,1);
                    }

                    if (page == 1) {
                        if(list.length < res.data.sumpage){
                            listHtml +='<li style="border-bottom: none;"><p class="c-999 t-c pt30 pb20" style="width: 100%;">没有更多了</p></li>'
                            pullUp = false;
                        }else {
                            pullUp = true;
                        }
                        $("#actContent").html(listHtml)
                    } else {
                        $("#actContent").append(listHtml)
                        pullUp = true;
                    }
                    page++;
                    SystemCheckVersion()

                } else if (type == 3) {

                    var storeHtml = '';

                    for (var k = 0; k < list.length; k++) {
                        var store = {"store_id": list[k].id};
                        storeHtml += '<li tapmode onclick=\'commonUrl("store_detail",' + jsonChange(store) + ')\'>' +
                            '                    <div class="store-img bg-cover" style="background: url(' + ajaxUrl + list[k].logo_path + ')"></div>' +
                            '                    <div class="store-info">' +
                            '                        <h6>' + list[k].title + '</h6>' +
                            '                        <p class="single-ellipsis">' + list[k].brief + '</p>' +
                            '                    </div>' +
                            '                </li>'
                    }

                    /*if (page == 1) {
                        $("#storeContent").html(storeHtml)
                    } else {
                        $("#storeContent").append(storeHtml)
                    }*/
                    page++;
                    pullUp = true;

                } else if(type == 4){

                    var listHtml = '';

                    listHtml += getVoteText(list,1);

                    if (page == 1) {
                        if(list.length < res.data.sumpage){
                            listHtml +='<li style="border-bottom: none;"><p class="c-999 t-c pt30 pb20" style="width: 100%;">没有更多了</p></li>'
                            pullUp = false;
                        }else {
                            pullUp = true;
                        }
                        $("#voteContent").html(listHtml)
                    } else {
                        $("#voteContent").append(listHtml)
                        pullUp = true;
                    }
                    page++;

                    SystemCheckVersion()

                }


            } else {

                if (type == 1) {
                    if (page == 1) {
                        $("#inviteContent").html(noData)
                    } else {
                        $("#inviteContent").append('<p class="c-999 t-c pt30 pb20" style="width: 100%;">没有更多了</p>')
                    }
                } else if (type == 2) {
                    if (page == 1) {
                        $("#actContent").html(noData)
                    } else {
                        $("#actContent").append('<p class="c-999 t-c pt30 pb20" style="width: 100%;">没有更多了</p>')
                    }
                } else if (type == 3) {
                    if (page == 1) {
                        $("#storeContent").html(noData)
                    } else {
                        $("#storeContent").append('<p class="c-999 t-c pt30 pb20" style="width: 100%;">没有更多了</p>')
                    }
                } else if (type == 4) {
                    if (page == 1) {
                        $("#voteContent").html(noData)
                    } else {
                        $("#voteContent").append('<p class="c-999 t-c pt30 pb20" style="width: 100%;">没有更多了</p>')
                    }
                }

                pullUp = false;

                SystemCheckVersion()

            }




            pop.close();
        }, function (error) {

            if (type == 1) {
                $("#inviteContent").html(noData)
            } else if (type == 2) {
                $("#actContent").html(noData)
            } else if (type == 3) {
                $("#storeContent").html(noData)
            }

            pullUp = false;

            pop.notice(error.msg);
            pop.close();

        })
    }

    //获取一级广场
    function circle_gc1(){
        var param = {
            token: $api.getStorage('token'),
            type: 1,//类型：1获取一级分类 2获取二级分类
            circle_id: circle_id,//圈子id
            //gc_id: gc_id,//当type为2的时候必须传入，广场一级分类id
        }
        getAjax(Interface.circle_gc, param, function (res) {
            console.log(jsonChange(res))
            var data = res.data;
            var html = '';
            if(isDefine(data)){
                $.each(data,function(i,item){
                    if(i == 0){
                        html +='<li class="on" data-id="'+item.id+'" tapmode ><span>'+item.title+'</span></li>';
                        firstType = item.id;
                        circle_gc2();
                    }else {
                        html +='<li tapmode data-id="'+item.id+'"><span>'+item.title+'</span></li>';
                    }

                })
                $("#departmentkinds").html(html);
            } else {
                $("#department").html(noData);
            }

            pop.close();
        },function(error){
            pop.close();
        });

    }

    $(".department").on('click','.kinds li',function(){
        var _this = $(this);
        firstType = _this.attr('data-id');
        _this.addClass('on').siblings('li').removeClass('on');
        circle_gc2();
    })

    //获取二级广场
    function circle_gc2(){
        var param = {
            token: $api.getStorage('token'),
            type: 2,//类型：1获取一级分类 2获取二级分类
            circle_id: circle_id,//圈子id
            gc_id: firstType,//当type为2的时候必须传入，广场一级分类id
        }
        getAjax(Interface.circle_gc, param, function (res) {
            console.log(jsonChange(res))
            var data = res.data;
            if(isDefine(data)){
                var html = '';
                $.each(data,function(i,item){
                    html +='<li tapmode onclick="">'+
                        '    <div class="list-info" tapmode onclick="toDetail('+item.id+','+item.ranking+')">'+
                        '        <div class="num"><span>NO.'+item.ranking+'</span></div>'+
                        '        <div class="info">'+
                        '            <h6>'+item.title+'</h6>'+
                        '            <div class="pf">'+
                        '                <div class="star" data-num="'+item.aver_socre+'"></div>'+
                        '                <div class="mark">'+item.aver_socre+'分</div>'+
                        '            </div>'+
                        '        </div>'+
                        '    </div>'+
                        '    <div class="toEvaluate" tapmode onclick="toEvaluate('+item.id+')">去评星</div>'+
                        '</li>';

                })
                var hh = '<li style="height: 2rem;"></li>'
                $("#departmentlist").html(html + hh)
                // console.log($("#department").html())

                layui.use(['rate'], function(){
                    var rate = layui.rate;
                    //只读

                    $(".star").each(function () {
                        var _this = $(this);
                        var _num = _this.attr('data-num');
                        console.log(_num)
                        rate.render({
                            elem: _this,
                            value: Number(_num),
                            readonly: true,
                            half: true //开启半星
                        });
                    });

                });

            }else {
                $("#departmentlist").html(noData)
            }
            pop.close();
        },function(error){
            pop.close();
        });

    }





    //圈主详情页
    function circleMaster() {

        if (member_id == 0) {
            var param = {circle_id: circle_id}
            commonUrl('circle_master', param);
        } else {
            var param = {member_id: member_id}
            commonUrl('../activity/person_index', param);
        }

    }

    //申请圈主
    function applyMaster() {
        var param = {circle_id: circle_id}
        commonUrl('circle_master', param);
    }


    function comfirmFollow() {
        if (circle_follow == 2) {
            pop.notice('母校圈子不能取消关注');
            return;
        }
        var type = 2;//1为会员，2为圈子
        //stype： 1为关注，2为取消关注
        if ($("#follow").hasClass('on')) {
            var stype = 2
        } else {
            var stype = 1
        }
        follow(stype, type, circle_id, function (res) {
            if (stype == 1) {
                pop.notice('关注成功');
                $("#follow").addClass('on').html('已关注')
            } else {
                pop.notice('已取消关注');
                $("#follow").removeClass('on').html('关注')
            }
            api.sendEvent({
                name: 'follow_Circle'
            })
        })
    }


    //关注、取消关注
    function followAction(stype, pid,that) {
        var type = 1;//类型：1会员 2圈子

        var className = '.class'+pid;

        follow(stype, type, pid, function (res) {
            if (stype == 1) {
                pop.notice('关注成功');
                // $(className).addClass('on')
                $(className).remove();
                // $(that).parents('.follow').addClass('on')
            } else {
                pop.notice('已取消关注');
                $(className).removeClass('on')
                // $(that).parents('.follow').removeClass('on')
            }
        })
    }

    //排序
    function screen(that) {
        if ($(that).hasClass('on')) {
            $(that).removeClass('on').html('按热度');
            sort = 1;

        } else {
            $(that).addClass('on').html('按时间');
            sort = 2;
        }
        page = 1;
        getCircleDetail()
    }

    //切换
    function tabComment(tab, that) {
        $(that).addClass('on').siblings('li').removeClass('on');
        if (tab == 3) {
            $(".screen-btn").hide();
        } else {
            $(".screen-btn").show().removeClass('on').html('按热度');
        }
        $('.circle-list-section .circle-list').eq($(that).index()).show().siblings(".circle-list").hide();

        type = tab;
        page = 1;
        sort = 1;
        if(tab == 3){
            circle_gc1(1);
        }else {
            getCircleDetail()
        }
    }


    //热度榜
    function hot_ranking(path) {
        var param = {
            circle_id: circle_id
        }
        commonUrl(path, param);
    }


    //跳转发布帖子
    function release_invitation(path) {
        var param = {
            circle_id: circle_id
        }
        commonUrl(path, param);
    }

    //跳转发布活动
    function release_activity(path) {
        var param = {
            circle_id: circle_id
        }
        commonUrl(path, param);
    }


    //刷新
    function reloadDetail() {
        page = 1;
        getCircleDetail()
    }

    //开启弹窗
    function openModel() {
        _model.addClass('showModel');
        setTimeout(function () {
            _model.find('.release-view').addClass('showView');
        }, 10)
    }

    //阻止事件冒泡
    function stopModel(event) {
        event.stopPropagation();
    }

    //关闭弹窗
    function closeModel(event) {
        if (event) {
            event.stopPropagation();
        }
        _model.find('.release-view').removeClass('showView');
        setTimeout(function () {
            _model.removeClass('showModel');
        }, 300)
    }

    $(".head-title").on('click', 'li', function () {
        var _this = $(this);
        var type = _this.attr('data-type');
        if (type == 1) {
            $(".circle-name").html('我的圈子').find('.circle-num').show();
            $(".find-circle").hide().siblings('.my-circle').show();
        } else {
            $(".circle-name").html('发现圈子').find('.circle-num').hide();
            $(".my-circle").hide().siblings('.find-circle').show();
        }
        _this.addClass('on').siblings('li').removeClass('on');
    });



    /*$(document).ready(function(){

        $(window).scroll(function(event){
            var winPos = $(window).scrollTop();
            if(winPos>0){
                $(".header").addClass('headerFixed');
                $(".circle-view").css({paddingTop: '1rem'})
                api.setStatusBarStyle({
                    style: 'dark', //设置APP状态栏字体色
                    color: '#fff', //设置APP状态栏背景色
                });
            }else {
                $(".header").removeClass('headerFixed');
                $(".circle-view").css({paddingTop: '0.1rem'})
                api.setStatusBarStyle({
                    style: 'light', //设置APP状态栏字体色
                    color: 'rgba(255,255,255,0)', //设置APP状态栏背景色
                });
            }
        });

    })*/


</script>
